/**
 * 主界面
 * by wyy
 */
class mainScene extends GameObject implements eui.UIComponent {
    private static instance: mainScene;
    public titleLbl: eui.Label;
    public startBtn: eui.Button;
    public shopBtn: eui.Button;

    constructor() {
        super();
        this.skinName = "resource/eui_skins/game_skins/mainSceneSkin.exml";
    }

    addToStage() { }
    firstCreate() {
        this.startBtn.addEventListener(egret.TouchEvent.TOUCH_TAP, this.startGame, this);
        this.shopBtn.addEventListener(egret.TouchEvent.TOUCH_TAP, this.openShop, this);
    }
    onRemove() { }

    private startGame() {
        SceneManager.getInstance().changeScene(gameScene.getInstance());
    }
    private openShop(){
        
    }
    public static getInstance() {
        (!this.instance) && (this.instance = new mainScene());
        return this.instance;
    }



}